package hxy.bytecode.spring.bean;

import hxy.bytecode.spring.bean.entity.UserEntity;
import hxy.bytecode.spring.bean.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author eric
 * @date 11/6/19 8:55 AM
 */
@Service
public class SpringMain {


    @Autowired
    UserService userService;
    public void main(){
        System.out.println("SpringMain的main方法可以作为Spring的入口，也算是整个程序的入口");
//        获取用户信息
        UserEntity userEntity = userService.getUserById(3);
        System.out.println(userEntity);

    }
}
